/************************************************************************************************/
/*Lab 3: PrepareTokens.cpp									*/
/*												*/
/*Description: This program file declares commands that will be used to organize tokens and	*/
/*	       store them into the corresponding locations, whether it be directives, labels,	*/
/*	       comments, or operation codes.  This function does not do error checking for	*/
/*	       operation codes, so if there is something that looks like operation code, then it*/
/*	       will just passed on.								*/	 
/*												*/
/*Modification Log:										*/
/*												*/
/*		2012/03/07 - A little expansion on the code, trying to work out a reasonable way*/
/*			     to sort tokens. (Samuel Thacker)					*/
/*		2012/03/05 - Creation of this program file. (Samuel Thacker)			*/
/*												*/
/*               ----Please report any modifications made to this file please----               */
/************************************************************************************************/

#include "AssemblerClasses.hh"
#include "PrepareTokens.hh"
#include <iostream>
#include <fstream>
#include <vector>
#include <string>

using namespace std;

SortFile(string FNAME) //Reads and Sorts a file.
	{
	ifstream myfile;
	string line;
	myfile.open (FNAME.c_str());
	
	while(getline(myfile,line))
		{
		Sort(TokenizeLine(line));
		}

	


	}

vector<string> TokenizeLine(string LINE) //Gets a line then tokenizes it.
	{
	}

AssemblerData Sort(); //Sorts tokens into their appropiate category.
	{
	/* Declaring Variables */
	AssemblerData data; //
	unsigned int i, j, k; //Variables used for iteration.
	unsigned int POS = 0; //The position of the token (starts at 0).
	bool AoD; //Indicator of whether a directive or assembly command is being read.
	char indDIR = 0; //0 if not a .data or .text, 1 if .data, 2 if .text.
	string tempSTR;
	vector<Tokens> tokLIST;
	vector<string> tokens, tempSTRVEC;
	AssemblyCommands dir;

	/* Defining Variables */
	tokList = (* TOK.GetTokens());

	/* Sorting */
	for(i = 0;i < (tokList.size();i++) //Iterates through tokList
		{
		tokens = tokList[i].ret_token();
		for(j = 0;j < tokens.size();j++) //Iterates through the vector of tokens in "tokList"
			{
			if (tokens[j][0] = '#') //Comment
				{
				tempSTR.clear();
				for(k = j;k < tokens.size() - j;k++)
					{
					if (k != j)
						temStr += " ";
					tempSTR += tokens[k];
					}//rof
				com_append(tempSTR,tokList[i]
				}//fi
			else if (tokens[j][0] = '.') //Directive
				{
				AoD = 1; //Reading a directive.
				if 
				tempSTRVEC.push_back(tokens[j])
				}
			}//rof
		}//rof
	}








